﻿using AnesSystem.Models;
using AnesSystem.Services;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AnesSystem.ViewModels
{
    class ConfigDrugsDataGridViewModel : BaseViewModel<ConfigDrugsDataGridViewModel>
    {
        #region Variables

        private ObservableCollection<ConfigDrugsModel> _configDrugsModel = new ObservableCollection<ConfigDrugsModel>();

        #endregion

        #region Constructor

        public ConfigDrugsDataGridViewModel()
        {
            InitConfigDrugsModel();
        }

        #endregion

        #region Properties

        public ObservableCollection<ConfigDrugsModel> ConfigDrugsModel
        {
            get
            {
                return _configDrugsModel;
            }

            set
            {
                _configDrugsModel = value;
                RaisePropertyChanged("ConfigDrugsModel");
            }
        }

        #endregion

        #region Event

        #endregion

        #region Private Methods
        private void InitConfigDrugsModel()
        {
            IEnumerable<ConfigDrugsModel> list = ConfigDrugsModelService.Instance.FindAll().ToList();
            foreach (var item in list)
            {
                _configDrugsModel.Add(item);
                
            }
        }

       
        #endregion

        #region Public/Protected Methods


        #endregion

        #region EventHandlers

        #endregion

        #region Command

        #region ChangeDoctorCommand

        #endregion

        #region OpenPopupCommand

        #endregion
        #endregion
    }
}
